package com.woniuxy.utils;

/**
 * @Author: 马宇航
 * @Todo: Java类型转JSON类型
 * @DateTime: 25/09/08/星期一 17:40
 * @Component: 成都蜗牛学苑
 **/
public class JavaType2JsonType {
    public static String convert(String javaType) {
        switch (javaType) {
            case "int":
            case "Integer":
                return "integer";
            case "long":
            case "Long":
                return "number";
            case "float":
            case "Float":
                return "number";
            case "double":
            case "Double":
                return "number";
            case "boolean":
            case "Boolean":
                return "boolean";
            case "String":
                return "string";
            case "java.util.Date":
            case "java.sql.Date":
                return "string";
            default:
                return "object";
        }
    }
}
